<?php
/**
 * 后台退出登录控制器。
 *
 * @author    Fairyin <fairyin@126.com>
 * @copyright © 2016 www.imcn.vip
 * @version   v1.0
 */

namespace App\Http\Controllers\Shadow;

use Redirect;

class LogoutController extends ShadowController
{
    public function onGet()
    {
        if ($this->user) {
            setcookie('u', '', time() - 86400, '/', '.imcn.vip');
        }
        
        return Redirect::to('/shadow/login');
    }
}
